<?php /* Smarty version 2.6.18, created on 2008-06-13 22:56:20
         compiled from admin/Websetup_roles_list.html */ ?>
<table id="rolesList">
<thead>
<tr id="tr_0">
	<th colspan="2">角色列表</th>
	<td colspan="3"><a id="linkRoleCreate" href="#">添加新角色</a></td>
</tr>
</thead>
<tr id="headline">
	<th>角色名称</th>
	<th>说明</th>
	<th colspan="3">操作</th>
</tr>
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['rolesList']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<tr id="tr_<?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['role_id']; ?>
">
	<td><?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['rolename']; ?>
</td>
	<td><?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['description']; ?>
</td>
	<td><a href="#" onclick="roleUpdate( <?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['role_id']; ?>
, '<?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['rolename']; ?>
', '<?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['description']; ?>
' );">修改</a></td>
	<td><a class="linkRoleRemove" role_id="<?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['role_id']; ?>
" href="#">删除</a></td>
	<td><a href="?controller=admin_roles&action=band&role_id=<?php echo $this->_tpl_vars['rolesList'][$this->_sections['i']['index']]['role_id']; ?>
">绑定</a></td>
</tr>
<?php endfor; endif; ?>

</table>

<!-- 修改角色的表单/隐藏状态 -->
<div id="divRoleCRUD" class='hideme'>

<form id="formRoleUpdate" action="?controller=admin_roles&action=roleupdate" method="POST">
	<table>
		<tr>
			<th>ID:</th>
			<td>
				<input id='u_role_id' name='role_id' type='text' readonly='readonly' size='4' /> * 不可修改
			</td>
		</tr>
		<tr>
			<th>角色名称:</th>
			<td>
				<input id='u_rolename' name='rolename' type='text' size='20' class='required' 
				title='角色名称不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>角色说明:</th>
			<td>
				<input id='u_description' name='description' type='text' size='20' class='required' 
				title='角色说明不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='修改' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
</form>

<form id="formRoleCreate" action="?controller=admin_roles&action=rolecreate" method="POST">
	<table>
		<tr>
			<th>角色名称:</th>
			<td>
				<input id='c_rolename' name='rolename' type='text' size='20' class='required' 
				title='角色名称不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>角色说明:</th>
			<td>
				<input id='c_description' name='description' type='text' size='20' class='required' 
				title='角色说明不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='创建新角色' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
</form>

</div>


